package com.ebuy.api;

import com.ebuy.api.base.util.JsonUtil;
import com.ebuy.api.domain.TbUser;
import com.ebuy.api.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @description:
 * @author: ren.zhong@chebada.com
 * @date: 2023年11月21日17:57:26
 **/
@Component
@Slf4j
public class AuthRunner implements ApplicationRunner {
    @Autowired
    UserService userService;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("AuthRunner开始");
       List<TbUser> tbUserList= userService.list();
       log.info("tbUserList-{}", JsonUtil.toJson(tbUserList));
    }
}